package com.rui.study.micro.goods.util;

import com.rui.study.commons.model.GlobalStatus;
import lombok.Getter;

@Getter
public enum StatusCode implements GlobalStatus {
    SUCCEED                             ("00000000", "success"),
    SYSTEM_EXCEPTION                    ("GOODS-99999999", "系统异常"),
    ILLEGAL_PARAMETER                   ("GOODS-10010001", "参数错误"),
    ACCESS_DENIED                       ("GOODS-10010002", "拒绝访问"),


    DATA_INSERT_FAILED                  ("GOODS-10020001", "保存数据失败"),

    AUTHENTICATION_FAILED               ("GOODS-30010001", "用户名或密码错误"),
    GOODS_COUNT_DEDUCT_FAILED           ("GOODS-30010002", "商品数量扣减失败"),

    KEY_MANAGE_NOT_AVAILABLE            ("GOODS-30020001", "秘钥服务暂时不可用"),;


    private String status;

    private String message;

    StatusCode(String Status, String message) {
        this.status = Status;
        this.message = message;
    }
}
